wayland: Don't always restore the saved size when floating
authorJonas Ådahl <jadahl@gmail.com>
Tue, 18 Jan 2022 14:45:30 +0000 (15:45 +0100)
committerJonas Ådahl <jadahl@gmail.com>
Tue, 18 Jan 2022 14:46:10 +0000 (15:46 +0100)
commitbe7a391a131a9a5e3f7ef0460caf1e118b4e659a
tree0c8316196f5871cf27527398910ef5bb8f9a1494
parentc71cb35e9dc3cf4dc109ce64dbd7731c93018f56
wayland: Don't always restore the saved size when floating

We only save the size when we transition from floating to fixed, so that
we can restore the size to the one prior to being fixed.

However, we should not restore to this size whenever we see a 0x0 size
from xdg_toplevel, as it can do that any time it doesn't care about the
size, e.g. when the surface is floating and just changing state.

Fix this by only using the saved size when transitioning from fixed to
floating, not when staying floating while previously floating.

Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/4634
gdk/wayland/gdksurface-wayland.c